import React from 'react';
/* 全局状态的管理  vuex  redux */
/* useReducer  全局状态的管理 */
import useMyReducer from './reducer';
const App = () => {
  const [state,dispatch] = useMyReducer()
  return (
    <div>
      <button onClick={()=>{
        dispatch({type:"increase"})
      }}>{state.count}</button>
      <button onClick={()=>{
        dispatch({type:"decrease"})
      }}>{state.count}</button>
    </div>
  );
}

export default App;
